package com.cloudlead.common.worker.action;

import java.io.Serializable;

/**
 * Action日志定义
 * 
 * @author dean.lu
 * 
 */
public class ActionLog implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = -7030666148838089103L;

	public enum LogMode {
		Request, Response, Error, Performance
	}

	private String actionName;
	private String token;
	private LogMode logMode;
	private Object content;

	public ActionLog(String actionName, String token, LogMode logMode,
			Object content) {
		super();
		this.actionName = actionName;
		this.token = token;
		this.logMode = logMode;
		this.content = content;
	}

	public String getActionName() {
		return actionName;
	}

	public void setActionName(String actionName) {
		this.actionName = actionName;
	}

	public String getToken() {
		return token;
	}

	public void setToken(String token) {
		this.token = token;
	}

	public LogMode getLogMode() {
		return logMode;
	}

	public void setLogMode(LogMode logMode) {
		this.logMode = logMode;
	}

	public Object getContent() {
		return content;
	}

	public void setContent(Object content) {
		this.content = content;
	}

	@Override
	public String toString() {
		return String
				.format("{ActionLog:{actionName:%s, token:%s, logMode:%s, content:%s}}",
						actionName, token, logMode, content);
	}

}
